Uploaded image for project: 'TinkerPop'
  1. TinkerPop
  2. TINKERPOP-1402

Impossible for graph implementations to provide a class resolver for Gryo IO

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Critical
    • Resolution: Done
    • 3.2.1
    • 3.2.2
    • structure
    • None

    Description

      As far as I can tell there is no way for a graph implementation to specify a classresolver for the following code:

      g.io(IoCore.gryo()).writer().create()

      The problem is that inside the graph implementation we need to be able to do this:

      public <I extends Io> I io(final Io.Builder<I> builder) {
        Io io = builder.graph(this).registry(MyRegistry.INSTANCE).classResolver(MyClassReolver.INSTANCE).create();
      

      but only supplying a registry is supported.
      Other solutions could be to design GryoIo for extension so that it can be wrapped or to change the signature of Graph#io to:

      public default Io io(final Io.Builder<I> builder)
      

      I would probably go for the signature change, so the graph is responsible for deciding the implementation that is returned.

      Attachments

        Issue Links

          Activity

            People

              spmallette Stephen Mallette
              bryncooke Bryn Cooke
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: